package com.cxyzy.demo

import okhttp3.OkHttpClient
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory

fun getNetworkService(): NetworkService {
    val okHttpClient = OkHttpClient.Builder().build()
    val retrofit = Retrofit.Builder()
        .client(okHttpClient)
        .baseUrl("https://gitee.com/")
        .addConverterFactory(GsonConverterFactory.create())
        .build()

    return retrofit.create(NetworkService::class.java)
}